import imaplib

username = 'rishab'
password = 'fallingleaves'
servername = 'students.iiit.ac.in'
port_imap = 143

M = imaplib.IMAP4(servername, port_imap)

M.login(username,password)

typ, data = M.select()

typ, msg = M.fetch('6,4', '(BODY[TEXT])')

typ = M.create('new_new')
print typ[1][0]
